
public class CPU 
{
	private Process m_process;
	private long    m_totalCycles;
	private long	m_busyCycles;
	
	public CPU()
	{
		m_process = null;
		m_totalCycles = 0;
		m_busyCycles = 0;
	}
	
	public Process getProcess()
	{
		return m_process;
	}
	public void setProcess(Process proc)
	{
		m_process = proc;
	}
	
	public long getTotalCycles()
	{
		return m_totalCycles;
	}
	
	public long getBusyCycles()
	{
		return m_busyCycles;
	}
	
	public void execute()
	{
		if (m_process != null)
		{
			m_process.execute();
			++m_busyCycles;
		}
		++m_totalCycles;
	}
}
